﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.IO;

namespace EECMISWS.WebProcessArgs
{
    [DataContract]
    public class UploadPhotoArgs
    {
        [DataMember]
        public string PhotoName { get; set; }

        [DataMember]
        public string OrigPhotoPath { get; set; }

        [DataMember]
        public string DestPhotoPath { get; set; }

        [DataMember]
        public string SFZH { get; set; }

        [DataMember]
        public string PersonName { get; set; }

        public override string ToString()
        {
            string strRet = string.Format("序列号:{0};原图照片路径:{1};制证照片路径:{2};身份证号:{3};姓名:{4}",
                PhotoName,
                OrigPhotoPath,
                DestPhotoPath,
                SFZH,
                PersonName);
            return strRet;
        }

        public bool IsVaild()
        {
            if (!File.Exists(DestPhotoPath))
            {
                return false;
            }
            if (string.IsNullOrEmpty(PhotoName))
            {
                return false;
            }
            return true;
        }
    }
}
